home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 6
/
The Arsenal Files 6 (Arsenal Computer).ISO
/
prg_basi
/
n_b-v200.zip
/
NBT1
/
DMO
/
TPRINT.DMO
< prev
next >
Wrap
Text File
|
1996-03-11
|
4KB
|
62 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME TPRINT .DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
$INCLUDE "DAS-NBT1.INC" ' use "DAS-NBT0.INC" for mouse support
WIDTH 80,25 ' CHANGE 25 TO 43 or 50
SCREEN 0,,1,1 ' Apage = 1 and Vpage = 1
COLOR 7, 0
CLS
? "┌───────────────────────────────────────────────────────────────────────
? "│ Tprint ( Row?, Col?, V$, Attr? )
? "│ fTprint?? ( Row?, Col?, V$, Attr? )
? "├─────────────────────────────────────────────────────────────────────────
? "│ Before going into all the cousins to this routine it is important to know
? "│ what is going on here as they all work the same with some added feature.
? "│ 1. the cursor is NOT effected []
? "│ 2. the COLOR command has no effect and is not effected
? "│ 3. the screen will NOT scroll
? "│ 4. you cannot (are not allowed to) print past the end of the screen
? "│ 5. you can change the color attribute in the middle of the string
? "│ 6. printing can be done using the current attribute(s) found on the screen
? "├─────────────────────────────────────────────────────────────────────────────
? "│ The 'trigger' to change attributes is CHR$(17) or ^PQ then CHR$(Attr?)
? "│ The test below changes from Attr? = 30 to Attr? = 31
? "└─────────────────────────────────────────────────────────────────────────────
LOCATE 7,34,1,15,16
Text$ = " This is a test. " : Tprint 17, 1, Text$, 30 ' yellow on blue
Tprint 18, 1, Text$, 0 ' screen's attr
Text$ = " This is a test. " : Tprint 19, 1, Text$, 30 ' change attrs
Tprint 21, 1, STRING$(2000,65), 112 ' past the end
MAP A$$ * 13, 6 AS A1$$, 2 AS A2$$, 5 AS A3$$
A1$$ = "HELLO"
A2$$ = CHR$(17,31)
A3$$ = "WORLD"
Tprint 22, 13, A$$, 30
TYPE JunkTYPE ' Tprint can be used to print
A AS STRING * 6 ' literal strings, functions,
T AS STRING * 2 ' types and just about anything
B AS STRING * 5 ' that is translated into a string
END TYPE ' by PowerBASIC. This phenomenon
DIM tT AS JunkTYPE ' is NOT shared by most of it's
tT.A = "HELLO " ' cousins as it is both space and
tT.T = CHR$(17,31) ' time consuming. Further it is,
tT.B = "WORLD" ' for the best part, unnecessary
Tprint 23, 13, tT, 30 ' for the other routines